import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import installation from '../views/installation.vue'

const guide = [
    {
        path: '/',
        component: installation,
    },
    {
        path: '/component/installation',
        name: 'installation',
        component: installation,
    },
    {
        path: '/component/quickstart',
        name: 'quickstart',
        component: () => import('../views/quickstart.vue')
    }
];
const basic = [
    {
        path: '/component/button',
        name: 'button',
        component: () => import('../views/buttonDemo.vue')
    },
    {
        path: '/component/link',
        name: 'link',
        component: () => import('../views/linkDemo.vue')
    },
];

const routes: Array<RouteRecordRaw> = [
    ...guide,
    ...basic,
]

const router = createRouter({
    history: createWebHashHistory(process.env.BASE_URL),
    routes
})

export default router
